﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Admin.aspx.cs" Inherits="ControlYSeguimiento_Web_App.Admin.Admin" %>

<%@ Register Assembly="Trirand.Web" Namespace="Trirand.Web.UI.WebControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../Content/themes/Supercharged/jquery-ui-1.9.0.custom.css" />
    <link rel="stylesheet" type="text/css" href="../Content/jquery.jqGrid/ui.jqgrid.css" />
    <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="../Scripts/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
    <!-- This jQuery UI library is needed only for the code tabs, not needed by the grid per se -->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblError" Text="Error" CssClass="bigFailureNotification" Visible="false"
        runat="server" />
    <asp:Panel ID="PanelContent" runat="server">
        <asp:ScriptManager ID="ScriptManagerJuiceUi" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <asp:Panel ID="Panel1" CssClass="tableAllWide" runat="server" ScrollBars="Auto">
                    <cc1:JQGrid ID="JqgridTransactions" runat="server" DataSourceID="ObjectDataSourceTransactions"
                        AppearanceSettings-ShrinkToFit="false" PagerSettings-PageSize="100" Height="540px">
                        <PagerSettings PageSize="100" />
                        <AppearanceSettings ShrinkToFit="False"  />
                        <Columns>
                            <cc1:JQGridColumn DataField="Id" Width="15">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="Date" Width="120">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="Type" Width="80" TextAlign="Center">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="Code" Width="40" TextAlign="Center">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="User">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="Target">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="Customer">
                            </cc1:JQGridColumn>
                            <cc1:JQGridColumn DataField="V1">
                            </cc1:JQGridColumn>
                             <cc1:JQGridColumn DataField="V2">
                            </cc1:JQGridColumn>
                             <cc1:JQGridColumn DataField="V3">
                            </cc1:JQGridColumn>
                             <cc1:JQGridColumn DataField="V4">
                            </cc1:JQGridColumn>
                             <cc1:JQGridColumn DataField="V5">
                            </cc1:JQGridColumn>
                             <cc1:JQGridColumn DataField="V6">
                            </cc1:JQGridColumn>
                        </Columns>
                    </cc1:JQGrid>
                    <%--        <asp:GridView ID="GridViewTransactions" runat="server" CssClass="TargetGrid" EmptyDataText="No transactions found"
                        AutoGenerateColumns="False" DataSourceID="ObjectDataSourceTransactions" AllowSorting="True"
                        AllowPaging="True">
                        <Columns>
                            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                            <asp:BoundField DataField="Date" HeaderText="Fecha" SortExpression="Date" />
                            <asp:BoundField DataField="Type" HeaderText="Tipo" SortExpression="Type" />
                            <asp:BoundField DataField="Result" HeaderText="Cod." SortExpression="Result" />
                            <asp:BoundField DataField="Value1" HeaderText="V1" SortExpression="Value1" />
                            <asp:BoundField DataField="Value2" HeaderText="V2" SortExpression="Value2" />
                            <asp:BoundField DataField="Value3" HeaderText="V3" SortExpression="Value3" />
                            <asp:BoundField DataField="Value4" HeaderText="V4" SortExpression="Value4" />
                            <asp:BoundField DataField="Value5" HeaderText="V5" SortExpression="Value5" />
                            <asp:BoundField DataField="Value6" HeaderText="V6" SortExpression="Value6" />
                            <asp:BoundField DataField="TargetAssociated" HeaderText="Blanco" SortExpression="TargetAssociated" />
                            <asp:BoundField DataField="CustomerAssociated" HeaderText="Cliente" SortExpression="CustomerAssociated" />
                            <asp:BoundField DataField="UserAssociated" HeaderText="Usuario" SortExpression="UserAssociated" />
                        </Columns>
                    </asp:GridView>--%>
                </asp:Panel>
            </ContentTemplate>
            <%--<Triggers>
                <asp:PostBackTrigger ControlID="GridViewTransactions"></asp:PostBackTrigger>
            </Triggers>--%>
        </asp:UpdatePanel>
    </asp:Panel>
    <asp:Panel ID="PanelLogUser" runat="server" class="UserLoginBox" DefaultButton="btnLogUser">
        <div>
            <asp:Literal ID="litUser" Text="User" runat="server" />
        </div>
        <div>
            <asp:TextBox ID="txtUser" runat="server" Width="180px" /><br />
            <asp:RequiredFieldValidator runat="server" Display="Dynamic" ControlToValidate="txtUser"
                CssClass="failureNotification">This field is mandatory</asp:RequiredFieldValidator>
        </div>
        <div>
            <asp:Literal ID="litPassword" Text="Password" runat="server" />
        </div>
        <div>
            <asp:TextBox ID="txtPassword" TextMode="Password" Width="180px" runat="server" /><br />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                ControlToValidate="txtPassword" CssClass="failureNotification">This field is mandatory</asp:RequiredFieldValidator>
        </div>
        <div class="divCentered">
            <asp:Button ID="btnLogUser" CssClass="LoginButton" Text="Admin Login" runat="server"
                OnClick="btnLogUser_Click" />
        </div>
    </asp:Panel>
    <asp:ObjectDataSource ID="ObjectDataSourceTransactions" runat="server" OldValuesParameterFormatString="original_{0}"
        OnObjectCreating="ObjectDataSourceTransactions_ObjectCreating" SelectMethod="GetTransactionsTable"
        TypeName="ControlYSeguimiento.Domain.Facade"></asp:ObjectDataSource>
</asp:Content>
